package domotica.house.simulation.utils;

import java.util.List;
import domotica.house.automation.ActuatorSensor;
import domotica.house.automation.ActuatorSensorSimulator;

/**
 * Questa classe simula l'azione di un ActuatorSensor su una variabile fisica.
 */
public abstract class TaskSimulator implements Runnable{

	private List<String> parametersList;
	private PhysicVariableSimulator physicSimulator;
	private ActuatorSensorSimulator actuatorSensorSimulator;
	
	public TaskSimulator(ActuatorSensorSimulator actuatorSensorSimulator, List<String> parametersList, PhysicVariableSimulator physicSimulator){
		this.parametersList=parametersList;
		this.physicSimulator=physicSimulator;
		this.actuatorSensorSimulator=actuatorSensorSimulator;
	}
	
	/**
	 * Questo metodo interrompe il thread associato 
	 */
	public abstract void interrupt();
	
	/**
	 * Il metodo <code>run</code> interagisce con PhysicVariableSimulator per
	 * portare avanti il task dell'ActuatorSensorSimulator 
	 */
	public abstract void run();
	
	public List<String> getParametersList(){
		return this.parametersList;
	}
	
	public PhysicVariableSimulator getPhysicSimulator() {
		return physicSimulator;
	}
	
	public ActuatorSensor getActuatorSensor(){
		return this.actuatorSensorSimulator;
	}

}
